package com.zhiwang.planet.sdk.bytedance_tinygame

import android.content.Context
import android.widget.ImageView
import com.bumptech.glide.Glide
import com.bumptech.glide.request.RequestOptions
import com.cmcm.cmgame.IImageLoader

object TinyGameImageLoader : IImageLoader {

    var glideOpts = RequestOptions()

    override fun loadImage(p0: Context, p1: String, p2: ImageView, p3: Int) {
        glideOpts = glideOpts.placeholder(p3).error(p3)
        Glide.with(p0)
                .load(p1)
                .apply(glideOpts)
                .into(p2)
    }
}